package io.itit.ecp.admin.server.entity;

import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.itit.grass.common.server.entity.BaseTenantEntity;
import lombok.Data;
import lombok.ToString;
import lombok.experimental.Accessors;

import java.util.Date;


/**
 * <p>
 *
 * @Author：Roy
 * @Description：设备管理-预警推送记录
 * @Date：Create by 2023-12-04 16:52:33
 */
@Data
@ToString
@TableName("ecp_tt_device_warning_record")
public class DeviceWarningRecordEntity extends BaseTenantEntity {

    private static final long serialVersionUID = 1L;

    /* 预警Id */
    private String deviceWarningId;

    /* 预警名称 */
    private String warningName;

    /* 项目Id */
    @TableField(updateStrategy = FieldStrategy.ALWAYS)
    private String sceneProjectId;

    /* 楼栋Id */
    @TableField(updateStrategy = FieldStrategy.ALWAYS)
    private String sceneEdificeId;

    /* 楼层Id */
    @TableField(updateStrategy = FieldStrategy.ALWAYS)
    private String sceneFloorId;

    /* 空间Id */
    @TableField(updateStrategy = FieldStrategy.ALWAYS)
    private String sceneRoomId;

    /* 判断规则(1:大于等于,2:小于等于) */
    private String judgeRule;

    /* 预警级别(1:(一级)红色预警,2:(二级)橙色预警,3:(三级)黄色预警) */
    private String thresholdLevel;

    /* 预警时间 */
    private Date warningDate;

    /* 预警设备详情json */
    private String deviceDetails;

    /* 状态(1:未读,2:部分已读,3:全部已读) */
    private String status;

    /* 机构Id */
    private String deptId;


    @Data
    @Accessors(chain = true)
    public static class DeviceDetail {

        private String deviceId;

        private String deviceName;

        private String modelId;

        private String modelName;

        private String thresholdValue;
    }

}